import local from '@/utils/localStoreUtils.js'
const initTitle = local.getT('TITLE') || '首页'
function titleReducer(state = initTitle, action) {
  switch (action.type) {
    case 'setTitle':
      console.error('触发')
      local.saveT('TITLE', action.data)
      return action.data
    case 'getTitle':
      return state
    default:
      return state
  }
}

export default titleReducer
